layui.define(['jquery', 'layer','paging', 'code','form','element'], function(exports){
    var form = layui.form();
    var index;

    layui.code();
    var $ = layui.jquery,
        paging = layui.paging(),
        layer = layui.layer,
        element = layui.element(); //Tab的切换功能，切换事件监听等，需要依赖element模块

    var inspnum = getQueryString("inspnum");

    $("body").on("click",".moress0",function(){

        parent.layui.element().tabAdd('demo', {
            title: inspnum+' 船舶基本信息',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Cbjbxx.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Cbjbxx"
        });
        parent.layui.element().tabChange('demo', inspnum+"Cbjbxx");
        parent.layui.element().init();

    });

    $("body").on("click",".moress1",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 船舶起重设备证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zsqz.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zsqz"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zsqz");
        parent.layui.element().init();

    });

    $("body").on("click",".moress2",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶乘客定额证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshck.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshck"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshck");
        parent.layui.element().init();

    });

    $("body").on("click",".moress3",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶船员舱室设备证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshcs.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshcs"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshcs");
        parent.layui.element().init();

    });

    $("body").on("click",".moress4",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶防止散装运输有毒物质污染证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshfd.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshfd"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshfd");
        parent.layui.element().init();

    });

    $("body").on("click",".moress5",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶防止空气污染证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshkq.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshkq"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshkq");
        parent.layui.element().init();

    });

    $("body").on("click",".moress7",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶吨位证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshdw.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshdw"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshdw");
        parent.layui.element().init();

    });

    $("body").on("click",".moress8",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶防止生活污水污染证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshfs.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshfs"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshfs");
        parent.layui.element().init();

    });

    $("body").on("click",".moress9",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶防止油污证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshyw.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshyw"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshyw");
        parent.layui.element().init();

    });

    $("body").on("click",".moress10",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶免除证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshmc.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshmc"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshmc");
        parent.layui.element().init();

    });

    $("body").on("click",".moress11",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶散装运输危险化学品适装证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshsz.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshsz"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshsz");
        parent.layui.element().init();

    });

    $("body").on("click",".moress12",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶散装运输液化气体适装证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshsy.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshsy"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshsy");
        parent.layui.element().init();

    });

    $("body").on("click",".moress13",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上船舶载重线证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshzz.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshzz"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshzz");
        parent.layui.element().init();

    });

    $("body").on("click",".moress14",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上浮船坞安全证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshfc.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshfc"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshfc");
        parent.layui.element().init();

    });

    $("body").on("click",".moress15",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上高速船安全证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshgs.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshgs"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshgs");
        parent.layui.element().init();

    });

    $("body").on("click",".moress16",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上货船适航证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshhc.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshhc"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshhc");
        parent.layui.element().init();

    });

    $("body").on("click",".moress17",function(){

    	parent.layui.element().tabAdd('demo', {
            title: inspnum+' 海上客船适航证书',
            content:'<iframe frameborder=0 width="100%" height="480px" marginheight=0 marginwidth=0 scrolling=auto src=OperaInspection/Zshkc.html?inspnum='+inspnum+'></iframe>',
            id: inspnum+"Zshkc"
        });
        parent.layui.element().tabChange('demo', inspnum+"Zshkc");
        parent.layui.element().init();

    });

    $.ajax({
        type: "GET",
        url: contextPath + "/personal/role",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function () {
            // $.ajax({
            //     type: "GET",
            //     url: contextPath + "/archives/cbjbxx/" + inspnum,
            //     contentType: "application/json; charset=utf-8",
            //     dataType: "json",
            //     success: function () {
            //         $(".moressx0").attr('class','layui-btn layui-btn-normal layui-btn-lg moress0');
            //     },
            //     error: function (e) {
            //     }
            // });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zsqz/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function () {
                    $(".moressx1").attr('class','layui-btn layui-btn-normal layui-btn-lg moress1');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshck/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx2").attr('class','layui-btn layui-btn-normal layui-btn-lg moress2');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshcs/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx3").attr('class','layui-btn layui-btn-normal layui-btn-lg moress3');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshfd/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx4").attr('class','layui-btn layui-btn-normal layui-btn-lg moress4');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshkq/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx5").attr('class','layui-btn layui-btn-normal layui-btn-lg moress5');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshdw/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx7").attr('class','layui-btn layui-btn-normal layui-btn-lg moress7');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshfs/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx8").attr('class','layui-btn layui-btn-normal layui-btn-lg moress8');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshyw/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx9").attr('class','layui-btn layui-btn-normal layui-btn-lg moress9');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshmc/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx10").attr('class','layui-btn layui-btn-normal layui-btn-lg moress10');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshsz/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx11").attr('class','layui-btn layui-btn-normal layui-btn-lg moress11');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshsy/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx12").attr('class','layui-btn layui-btn-normal layui-btn-lg moress12');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshzz/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx13").attr('class','layui-btn layui-btn-normal layui-btn-lg moress13');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshfc/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx14").attr('class','layui-btn layui-btn-normal layui-btn-lg moress14');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshgs/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx15").attr('class','layui-btn layui-btn-normal layui-btn-lg moress15');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshhc/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx16").attr('class','layui-btn layui-btn-normal layui-btn-lg moress16');
                },
                error: function (e) {
                }
            });

            $.ajax({
                type: "GET",
                url: contextPath + "/archives/zshkc/" + inspnum,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    $(".moressx17").attr('class','layui-btn layui-btn-normal layui-btn-lg moress17');
                },
                error: function (e) {
                }
            });

        },
        error: function (e) {
        }
    });

    exports('ArchivesList', {}); //注意，这里是模块输出的核心，模块名必须和use时的模块名一致
});